Skip to content

Split NuGet packages per UI framework (Uwp, WinUI, Uno) - #913

Merged
Sergio0694 merged 3 commits into
mainfrom
sergio0694-split-uno-packages
Dec 5, 2026
Merged

Sergio0694 merged 3 commits into
mainfrom
sergio0694-split-uno-packages

Conversation

@Sergio0694

@Sergio0694 Sergio0694 commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Fixes

Adopts CommunityToolkit/Tooling-Windows-Submodule#328, which gives each UI framework its own set of NuGet packages: CommunityToolkit.Uwp.* (UWP, WinUI 2), CommunityToolkit.WinUI.* (Windows App SDK, WinUI 3) and the new CommunityToolkit.Uno.* (Uno Platform). A package never mixes target frameworks of different UI frameworks, which also removes the empty lib/net10.0-windows10.0.18362/_._ placeholder workaround (#388). This repo had no EnableXamlCompilerMismatchedTfmUnoWorkaround to delete.

The tooling submodule points at the merged tooling main commit (e562b88, includes CommunityToolkit/Tooling-Windows-Submodule#328).

PR Type

  • Build or CI related changes

What is the current behavior?

The package job packs -MultiTargets all -WinUIMajorVersion 2|3. The CommunityToolkit.WinUI.* packages mix the Windows App SDK net10.0-windows10.0.26100 lib with the Uno libs (net10.0, net10.0-android/ios/maccatalyst) plus an empty net10.0-windows10.0.18362 placeholder, and are the documented packages for Uno apps.

What is the new behavior?

  • Submodule bump (own commit).
  • build.yml:
    • package, sign and release matrices are ui: [uwp, winui, uno]; the pack step is Build-Toolkit-Components.ps1 -UIFramework ${{ matrix.ui }}; artifacts are renamed consistently (nuget-list-*, nuget-packages-*, build-logs-*, signed-nuget-packages-*).
    • Restore dotnet tools, Remove .NET SDKs newer than global.json and uno-check only run for the uno package leg (with --target android --target ios --target macos) and, in the build job, only for the macos/ios/android legs. The wasm build leg no longer runs uno-check (the head needs no workload; confirmed by CI).
    • Run SourceGenerators tests runs only in the wasdk leg, and Setup VSTest Path only in the uwp/wasdk legs.
  • Directory.Build.targets: the Uno tag applies to the Uno packages (it checked WinUI before). Uno packages are no longer tagged UWP/WindowsAppSDK/WASDK/WinAppSDK/Universal.
  • Docs: ReadMe.md, .github/* instructions and validation skill, and the per-component package ReadMe.md ("Which Package is for me?", shipped inside every package) now point Uno apps to CommunityToolkit.Uno.* (components that only support UWP and WinUI have no Uno package).

Package verification (local)

Packed the old flow (tooling c001882, -WinUIMajorVersion 2|3) and the new flow (-UIFramework uwp|winui|uno) with -Release and compared every .nupkg:

Set Packages lib/ folders Result
Uwp 24 net10.0-windows10.0.26100 same files/deps as old Uwp packages; placeholder gone
WinUI 24 net10.0-windows10.0.26100 same as old WinUI Windows lib; Uno lib + Uno.WinUI/Uno.Fonts.Fluent dependency group removed
Uno 19 net10.0 same files as the old WinUI net10.0 lib; ids CommunityToolkit.Uno.*; CameraPreview, ImageCropper, Media, RadialGauge, RichSuggestBox are uwp;wasdk-only so have no Uno package
  • Every package passes tooling/Test-Toolkit-Package.ps1 (exact id, exact lib folders, framework dependency). Sibling dependencies resolve to the same variant in each set (e.g. Uno.Triggers → Uno.Helpers). No component sets a fixed PackageId, and no package ships build/, buildTransitive/, analyzers/ or source generators.
  • CI (this PR, before the final tooling re-pin): all jobs green, including all 8 build legs (the wasm leg without uno-check) and the uwp/winui/uno package jobs. The uno leg packed all 19 CommunityToolkit.Uno.* packages with the mobile libs (e.g. lib/net10.0-android36.0; mobile folders are versioned) and skipped the 5 uwp;wasdk-only components.
  • Not verified locally: packing net10.0-android/ios/maccatalyst (workloads for the pinned SDK aren't installed here). MSBuild evaluation with all Uno MultiTargets gives net10.0;net10.0-maccatalyst;net10.0-ios;net10.0-android and CommunityToolkit.Uno.* ids; the actual mobile packing is only exercised by this PR's package job.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

Breaking change for Uno users: CommunityToolkit.WinUI.* no longer contains the Uno libs, so Uno apps upgrading must switch to CommunityToolkit.Uno.*. Uno heads in tooling still reference the released CommunityToolkit.WinUI.* preview until a preview with the Uno packages is published (tooling follow-up). Apps targeting both Uno and Windows must condition the package references per TFM (documented in the ReadMe).

Sergio0694 and others added 3 commits December 4, 2026 16:31
…bmodule#328

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bump tooling to the commit of CommunityToolkit/Tooling-Windows-Submodule#328, which gives each UI framework its own set of packages.

- Pack once per UI framework (uwp, winui, uno) in the package, sign and release jobs
- Only run uno-check for the mobile Uno build legs and the Uno package leg
- Run the SourceGenerators tests in a single build leg
- Tag the Uno packages as Uno, and not as Windows App SDK/UWP ones
- Update the docs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Every package ships its component's ReadMe.md, which told Uno.WinUI users to use the WinUI package. The components that only support UWP and Windows App SDK drop the Uno mention.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Sergio0694
Sergio0694 force-pushed the sergio0694-split-uno-packages branch from 7c58a9d to a43481a Compare December 5, 2026 00:31
@Sergio0694
Sergio0694 marked this pull request as ready for review December 5, 2026 00:32
@Sergio0694
Sergio0694 merged commit 81b268b into main Dec 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant